package com.soup.lab.spring.web.controller;

import com.soup.lab.spring.web.tools.enums.loader.SelectEnumPackageScanner;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/s")
public class SelectController {

    SelectEnumPackageScanner selectEnumPackageScanner = new SelectEnumPackageScanner("com.soup.lab.spring.web.enums");

    @RequestMapping("/{type}")
    public List select(@PathVariable("type") String type) {
        return selectEnumPackageScanner.load(type);
    }

}
